1000
It is possible to clip the bar's caption to bar, when the time scale is changed

with G2antt1 do
begin
	Columns.Add('Task');
	with Chart do
	begin
		PaneWidth[False] := 48;
		FirstVisibleDate := '12/27/2000';
		with Bars.Item['Task'] do
		begin
			Pattern := EXG2ANTTLib_TLB.exPatternBox;
			Height := 13;
		end;
	end;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','This is a bit of text that get''s clipped');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(4);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarToolTip] := ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCaption];
		h := AddItem('Task 2');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1','This is a bit of text that is not clipped');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(1);
	end;
end
999
How can I change the color for all bars with the key matching a pattern

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 64;
	Debug := True;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','A',Null);
		AddBar(h,'Task','1/5/2001','1/7/2001','B1',Null);
		AddBar(h,'Task','1/8/2001','1/17/2001','B2',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','B4',Null);
		ItemBar[0,'<B*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
998
How can I change the color for all bars in the same item with the key matching a pattern

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 64;
	Debug := True;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','A',Null);
		AddBar(h,'Task','1/5/2001','1/7/2001','B1',Null);
		AddBar(h,'Task','1/8/2001','1/17/2001','B2',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Null);
		ItemBar[h,'<B*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
997
How can I change the color for all bars in the same item

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(h,'Task','1/5/2001','1/7/2001','K2',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Null);
		ItemBar[h,'<*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
996
How can I write a special number for each date related to a bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 32;
		LevelCount := 2;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/13/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('N1',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+2';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '4';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ffff;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
		with Add('N2',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+3';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '4';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ffff;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
		with Add('N3',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+4';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '5';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ff00;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
		with Add('N4',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+5';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '5';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ff00;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
		with Add('N5',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+6';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '8';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ff;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
		with Add('Z',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'E';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '4';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := -9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $80ff;
			PartCanMove[EXG2ANTTLib_TLB.exNoteStart] := True;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
		end;
	end;
	EndUpdate();
end
995
How can I assign a note to be always in the center of the bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := OleVariant(0.5);
			PartText[EXG2ANTTLib_TLB.exNoteStart] := 'note<br>center';
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ffff;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
		end;
	end;
	EndUpdate();
end
994
How can I assign a note relative to the start of the bar, and let it be movable

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+1';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '<%d%>';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := 9;
			PartCanMove[EXG2ANTTLib_TLB.exNoteStart] := True;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ffff;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
		end;
	end;
	EndUpdate();
end
993
How can I associate a note relative to the start of the bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'S+1';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '<%d%>';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := 9;
			PartBackColor[EXG2ANTTLib_TLB.exNoteStart] := $ffff;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
		end;
	end;
	EndUpdate();
end
992
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := 'E-1';
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '<%d%>';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 18;
			PartHOffset[EXG2ANTTLib_TLB.exNoteStart] := 9;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
		end;
	end;
	EndUpdate();
end
991
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := OleVariant(1);
			PartText[EXG2ANTTLib_TLB.exNoteStart] := 'End';
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
		end;
	end;
	EndUpdate();
end
990
How can I hide a bar without removing it
with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
		LevelCount := 2;
	end;
	HeaderVisible := EXG2ANTTLib_TLB.exHeaderVisibleExtendLevels;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Null);
		AddBar(AddItem('Item 2'),'Task','1/6/2001','1/14/2001','B2',Null);
		AddLink('L1',FindItem['Item 1',OleVariant(0),Null],'B1',FindItem['Item 2',OleVariant(0),Null],'B2');
		ItemBar[FirstVisibleItem,FirstItemBar[FirstVisibleItem],EXG2ANTTLib_TLB.exBarTransparent] := OleVariant(100);
	end;
	EndUpdate();
end
989
How can I align the caption in the note

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('N1',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartText[EXG2ANTTLib_TLB.exNoteStart] := 'S <b><%dd%></b>';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 48;
			PartAlignment[EXG2ANTTLib_TLB.exNoteStart] := EXG2ANTTLib_TLB.LeftAlignment;
			PartVOffset[EXG2ANTTLib_TLB.exNoteStart] := 17;
		end;
		with Add('N2',OleVariant(G2antt1.Items.FirstVisibleItem),'1','') do
		begin
			RelativePosition := OleVariant(1);
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkHidden;
			PartVisible[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartText[EXG2ANTTLib_TLB.exNoteStart] := 'E <b><%dd%></b>';
			PartFixedWidth[EXG2ANTTLib_TLB.exNoteStart] := 48;
			PartAlignment[EXG2ANTTLib_TLB.exNoteStart] := EXG2ANTTLib_TLB.RightAlignment;
			PartVOffset[EXG2ANTTLib_TLB.exNoteStart] := 17;
		end;
	end;
	EndUpdate();
end
988
How I can assign a note and let user move the note relative to the bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
	end;
	with Chart.Notes do
	begin
		with Add('Note',OleVariant(G2antt1.Items.FirstVisibleItem),'1','End') do
		begin
			PartText[EXG2ANTTLib_TLB.exNoteStart] := 'Day<br> <%dd%>';
			PartCanMove[EXG2ANTTLib_TLB.exNoteStart] := True;
			PartVOffset[EXG2ANTTLib_TLB.exNoteStart] := 16;
			PartTransparency[EXG2ANTTLib_TLB.exNoteStart] := 30;
			PartToolTip[EXG2ANTTLib_TLB.exNoteStart] := 'Click the note and start moving to a new position.';
		end;
	end;
	EndUpdate();
end
987
How can I assign a picture as a note associated with a bar

with G2antt1 do
begin
	BeginUpdate();
	HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
	HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
	AntiAliasing := True;
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/7/2001','1/11/2001','2',Null);
	end;
	with Chart.Notes do
	begin
		with Add('1',OleVariant(G2antt1.Items.ItemByIndex[0]),'1','<img>pic1</img>') do
		begin
			PartShadow[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartBorderSize[EXG2ANTTLib_TLB.exNoteEnd] := 0;
			ClearPartBackColor(EXG2ANTTLib_TLB.exNoteEnd);
			PartHOffset[EXG2ANTTLib_TLB.exNoteEnd] := -64;
			PartCanMove[EXG2ANTTLib_TLB.exNoteEnd] := True;
		end;
		with Add('2',OleVariant(G2antt1.Items.ItemByIndex[1]),'2','<img>pic2</img>') do
		begin
			PartShadow[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartBorderSize[EXG2ANTTLib_TLB.exNoteEnd] := 0;
			ClearPartBackColor(EXG2ANTTLib_TLB.exNoteEnd);
			RelativePosition := OleVariant(1);
			PartCanMove[EXG2ANTTLib_TLB.exNoteEnd] := True;
			LinkColor := $ff;
			LinkWidth := 2;
			LinkStyle := EXG2ANTTLib_TLB.exLinkDot;
			ShowLink := EXG2ANTTLib_TLB.exNoteLinkVisible;
		end;
	end;
	EndUpdate();
end
986
How can I assign a picture as a note associated with a bar

with G2antt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	AntiAliasing := True;
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1',Null);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/7/2001','1/11/2001','2',Null);
	end;
	with Chart.Notes do
	begin
		with Add('1',OleVariant(G2antt1.Items.ItemByIndex[0]),'1','<img>1</img>') do
		begin
			PartShadow[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartBorderSize[EXG2ANTTLib_TLB.exNoteEnd] := 0;
			ClearPartBackColor(EXG2ANTTLib_TLB.exNoteEnd);
		end;
		with Add('2',OleVariant(G2antt1.Items.ItemByIndex[1]),'2','<img>2</img>...<img>3</img>') do
		begin
			PartShadow[EXG2ANTTLib_TLB.exNoteEnd] := False;
			PartBorderSize[EXG2ANTTLib_TLB.exNoteEnd] := 0;
			ClearPartBackColor(EXG2ANTTLib_TLB.exNoteEnd);
			RelativePosition := OleVariant(1);
			PartCanMove[EXG2ANTTLib_TLB.exNoteEnd] := True;
			LinkColor := $ff;
			LinkWidth := 2;
			LinkStyle := EXG2ANTTLib_TLB.exLinkDot;
		end;
	end;
	EndUpdate();
end
985
How can I put a box assigned to a DATE

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Item 1');
		h := AddItem('Item 2');
	end;
	with Chart.Notes do
	begin
		with Add('D1',OleVariant(G2antt1.Items.FirstVisibleItem),G2antt1.Chart.FirstVisibleDate,'Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>') do
		begin
			PartCanMove[EXG2ANTTLib_TLB.exNoteEnd] := True;
			PartVOffset[EXG2ANTTLib_TLB.exNoteEnd] := 20;
			PartHOffset[EXG2ANTTLib_TLB.exNoteEnd] := 20;
		end;
		with Add('D2',OleVariant(G2antt1.Items.NextVisibleItem[G2antt1.Items.FirstVisibleItem]),'1/7/2001','Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>') do
		begin
			PartVisible[EXG2ANTTLib_TLB.exNoteStart] := True;
			PartText[EXG2ANTTLib_TLB.exNoteStart] := '<b><%d%></b>';
			PartCanMove[EXG2ANTTLib_TLB.exNoteEnd] := True;
			PartVOffset[EXG2ANTTLib_TLB.exNoteEnd] := 20;
			PartHOffset[EXG2ANTTLib_TLB.exNoteEnd] := 20;
		end;
	end;
	EndUpdate();
end
984
How can I add a note or a box associated with a bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','1','Center');
		ItemBar[h,'1',EXG2ANTTLib_TLB.exBarExtraCaption] := 'left';
		ItemBar[h,'1',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/7/2001','1/11/2001','2','Center');
		ItemBar[h,'2',EXG2ANTTLib_TLB.exBarExtraCaption] := 'right';
		ItemBar[h,'2',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(18);
	end;
	with Chart.Notes do
	begin
		Add('1S',OleVariant(G2antt1.Items.FirstVisibleItem),'1','Start');
		Add('1F',OleVariant(G2antt1.Items.FirstVisibleItem),'1','End').RelativePosition := OleVariant(1);
	end;
	EndUpdate();
end
983
Is it possible to define different working hours for every week day

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 14;
		NonworkingDays := 0;
		NonworkingHours := 0;
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		with Level[0] do
		begin
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Label := '<%dddd%>';
		end;
		with Level[1] do
		begin
			Label := '<%hh%>';
			Count := 6;
		end;
		UnitWidth := 16;
	end;
	Columns.Add('');
	with Items do
	begin
		h := AddItem(OleVariant(1));
		ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) != 1 or (weekday(value) = 1 and not ( hour(value) >= 9 and hour(value) <= 14 ))';
		h := AddItem(OleVariant(2));
		ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) = 2 and ( hour(value) >= 9 and hour(value) <= 14 )';
		h := AddItem(OleVariant(3));
		ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) = 3';
	end;
	EndUpdate();
end
982
How can I automatically update the exBarPercent value using a slider control

with G2antt1 do
begin
	BeginUpdate();
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		PaneWidth[False] := 128;
		Bars.Add('Task%Progress').Shortcut := 'Percent';
	end;
	with (IUnknown(Columns.Add('Percent')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(518);
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'P';
	end;
	with Items do
	begin
		i := AddItem(OleVariant(0));
		CellBold[OleVariant(i),OleVariant(0)] := True;
		CellEditor[OleVariant(i),OleVariant(0)].EditType := EXG2ANTTLib_TLB.SliderType;
		AddBar(i,'Percent','1/2/2002','1/6/2002','P',Null);
		ItemBar[i,'P',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
		CellValue[OleVariant(i),OleVariant(0)] := OleVariant(50);
	end;
	EndUpdate();
end
981
Is there any automatic way to change a property for all bars in the chart
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K2',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K3',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Null);
		ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
980
How can I assign an icon to a bar and I get notified when I click it

with G2antt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/5/2001','1/10/2001','','Caption');
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaption] := '<a1><img>1:8</img></a><a1><img>2</img></a>';
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHOffset] := OleVariant(5);
	end;
	EndUpdate();
end
979
How can I assign an icon to a bar so I do not break its caption

with G2antt1 do
begin
	BeginUpdate();
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/5/2001','1/10/2001','','Caption');
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaption] := '<img>1</img>';
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHOffset] := OleVariant(5);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionVOffset] := OleVariant(2);
	end;
	EndUpdate();
end
978
How can I assign multiple lables to the same bar

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/5/2001','1/7/2001','','Right');
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		AddBar(h1,'','1/5/2001','1/5/2001','T1','Left');
		ItemBar[h1,'T1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		AddBar(h1,'','1/5/2001','1/7/2001','T2','Center');
		GroupBars(h1,'',True,h1,'T1',True,Null,Null);
		GroupBars(h1,'',True,h1,'T1',False,Null,Null);
		GroupBars(h1,'',True,h1,'T2',True,Null,Null);
		GroupBars(h1,'',False,h1,'T2',False,Null,Null);
	end;
	EndUpdate();
end
977
Is there any way to have more Captions on a bar than one

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/5/2001','1/7/2001','','Right');
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		AddBar(h1,'','1/5/2001','1/5/2001','T1','Left');
		ItemBar[h1,'T1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(16);
		GroupBars(h1,'',True,h1,'T1',True,Null,Null);
		GroupBars(h1,'',True,h1,'T1',False,Null,Null);
	end;
	EndUpdate();
end
976
How can I assign multiple lables to the same bar at once

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.PaneWidth[False] := 96;
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/5/2001','1/8/2001','','Center');
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaption] := 'left';
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(16);
		h := AddItem('Task 2');
		AddBar(h,'Task','1/7/2001','1/11/2001','','Center');
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaption] := 'right';
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarExtraCaptionHAlign] := OleVariant(18);
	end;
	EndUpdate();
end
975
How can I limit the duration or length of the bar
with G2antt1 do
begin
	BeginUpdate();
	Chart.FirstVisibleDate := '1/1/2001';
	Chart.ScrollRange[EXG2ANTTLib_TLB.exStartDate] := '1/1/2001';
	Chart.ScrollRange[EXG2ANTTLib_TLB.exEndDate] := '1/7/2001';
	Chart.PaneWidth[False] := 128;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Item 1');
		AddBar(h,'Task','1/2/2001','1/5/2001',Null,Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarMinDuration] := OleVariant(2);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarMaxDuration] := OleVariant(5);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarCaption] := 'Min=2 / Max=5';
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
	EndUpdate();
end
974
I have an EBN file how can I apply different colors to it, so no need to create a new one

with G2antt1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	SelBackColor := BackColor;
	SelForeColor := ForeColor;
	HasLines := EXG2ANTTLib_TLB.exNoLine;
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		hC := InsertItem(h,Null,'Default');
		ItemBackColor[hC] := $1000000;
		ItemHeight[InsertItem(h,Null,'')] := 6;
		hC := InsertItem(h,Null,'Light Green');
		ItemBackColor[hC] := $100ff00;
		G2antt1.Chart.ItemBackColor[hC] := $100ff00;
		ItemHeight[InsertItem(h,Null,'')] := 6;
		hC := InsertItem(h,Null,'Dark Green');
		ItemBackColor[hC] := $1007f00;
		ItemHeight[InsertItem(h,Null,'')] := 6;
		hC := InsertItem(h,Null,'Magenta');
		ItemBackColor[hC] := $1ff7fff;
		ItemHeight[InsertItem(h,Null,'')] := 6;
		hC := InsertItem(h,Null,'Yellow');
		ItemBackColor[hC] := $17fffff;
		ItemHeight[InsertItem(h,Null,'')] := 6;
		ExpandItem[h] := True;
	end;
end
973
I need to specify the non-working hours for about 100 days for each item, but the scrolling is very slow. Is there any option to increase the speed

with G2antt1 do
begin
	BeginUpdate();
	AllowChartScrollPage := True;
	Columns.Add('Non-Work');
	with Chart do
	begin
		FirstVisibleDate := '4/4/2009 4:00:00 PM';
		PaneWidth[False] := 52;
		LevelCount := 2;
		UnitWidth := 16;
		with Level[0] do
		begin
			Label := '<r><%d%>-<%mmm%>';
			Unit := EXG2ANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<%hh%>';
			Unit := EXG2ANTTLib_TLB.exHour;
			Count := 2;
		end;
	end;
	with Items do
	begin
		AddItem('Default');
		ItemNonworkingUnits[AddItem('Test'),OleVariant(False)] := 'date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 12; #4/6/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 12; #4/7/2009# : hour(value) >= 6 and hour(value) <= 12; #4/8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/9/2' + 
	'009# : hour(value) >= 6 and hour(value) <= 12; #4/10/2009# : hour(value) >= 6 and hour(value) <= 12; #4/11/2009# : hour(value) >' + 
	'= 6 and hour(value) <= 12; #4/12/2009# : hour(value) >= 6 and hour(value) <= 12; #4/13/2009# : hour(value) >= 6 and hour(value) ' + 
	'<= 12; #4/14/2009# : hour(value) >= 6 and hour(value) <= 12; #4/15/2009# : hour(value) >= 6 and hour(value) <= 12; #4/16/2009# :' + 
	' hour(value) >= 6 and hour(value) <= 12; #4/17/2009# : hour(value) >= 6 and hour(value) <= 12; #4/18/2009# : hour(value) >= 6 an' + 
	'd hour(value) <= 12; #4/19/2009# : hour(value) >= 6 and hour(value) <= 12; #4/20/2009# : hour(value) >= 6 and hour(value) <= 12;' + 
	' #4/21/2009# : hour(value) >= 6 and hour(value) <= 12; #4/22/2009# : hour(value) >= 6 and hour(value) <= 12; #4/23/2009# : hour(' + 
	'value) >= 6 and hour(value) <= 12; #4/24/2009# : hour(value) >= 6 and hour(value) <= 12; #4/25/2009# : hour(value) >= 6 and hour' + 
	'(value) <= 12; #4/26/2009# : hour(value) >= 6 and hour(value) <= 12; #4/27/2009# : hour(value) >= 6 and hour(value) <= 12; #4/28' + 
	'/2009# : hour(value) >= 6 and hour(value) <= 12; #4/29/2009# : hour(value) >= 6 and hour(value) <= 12; #4/30/2009# : hour(value)' + 
	' >= 6 and hour(value) <= 12; #5/1/2009# : hour(value) >= 6 and hour(value) <= 12; #5/2/2009# : hour(value) >= 6 and hour(value) ' + 
	'<= 12; #5/3/2009# : hour(value) >= 6 and hour(value) <= 12; #5/4/2009# : hour(value) >= 6 and hour(value) <= 12; #5/5/2009# : ho' + 
	'ur(value) >= 6 and hour(value) <= 12; #5/6/2009# : hour(value) >= 6 and hour(value) <= 12; #5/7/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 12; #5/8/2009# : hour(value) >= 6 and hour(value) <= 12; #5/9/2009# : hour(value) >= 6 and hour(value) <= 12; #5/10/' + 
	'2009# : hour(value) >= 6 and hour(value) <= 12; #5/11/2009# : hour(value) >= 6 and hour(value) <= 12; #5/13/2009# : hour(value) ' + 
	'>= 6 and hour(value) <= 12; #5/14/2009# : hour(value) >= 6 and hour(value) <= 12; #5/15/2009# : hour(value) >= 6 and hour(value)' + 
	' <= 12; #5/16/2009# : hour(value) >= 6 and hour(value) <= 12; #5/17/2009# : hour(value) >= 6 and hour(value) <= 12; #5/18/2009# ' + 
	': hour(value) >= 6 and hour(value) <= 12; #5/19/2009# : hour(value) >= 6 and hour(value) <= 12; #5/20/2009# : hour(value) >= 6 a' + 
	'nd hour(value) <= 12; #5/21/2009# : hour(value) >= 6 and hour(value) <= 12; #5/22/2009# : hour(value) >= 6 and hour(value) <= 12' + 
	'; #5/23/2009# : hour(value) >= 6 and hour(value) <= 12; #5/24/2009# : hour(value) >= 6 and hour(value) <= 12; #5/25/2009# : hour' + 
	'(value) >= 6 and hour(value) <= 12; #5/26/2009# : hour(value) >= 6 and hour(value) <= 12; #5/27/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 12; #5/28/2009# : hour(value) >= 6 and hour(value) <= 12; #5/29/2009# : hour(value) >= 6 and hour(value) <= 12; #5/3' + 
	'0/2009# : hour(value) >= 6 and hour(value) <= 12; #5/31/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1/2009# : hour(value)' + 
	' >= 6 and hour(value) <= 12; #6/2/2009# : hour(value) >= 6 and hour(value) <= 12; #6/3/2009# : hour(value) >= 6 and hour(value) ' + 
	'<= 12; #6/4/2009# : hour(value) >= 6 and hour(value) <= 12; #6/5/2009# : hour(value) >= 6 and hour(value) <= 12; #6/6/2009# : ho' + 
	'ur(value) >= 6 and hour(value) <= 12; #6/7/2009# : hour(value) >= 6 and hour(value) <= 12; #6/8/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 12; #6/9/2009# : hour(value) >= 6 and hour(value) <= 12; #6/10/2009# : hour(value) >= 6 and hour(value) <= 12; #6/11' + 
	'/2009# : hour(value) >= 6 and hour(value) <= 12; #6/12/2009# : hour(value) >= 6 and hour(value) <= 12; #6/13/2009# : hour(value)' + 
	' >= 6 and hour(value) <= 12; #6/14/2009# : hour(value) >= 6 and hour(value) <= 12; #6/15/2009# : hour(value) >= 6 and hour(value' + 
	') <= 12; #6/16/2009# : hour(value) >= 6 and hour(value) <= 12; #6/17/2009# : hour(value) >= 6 and hour(value) <= 12; #6/18/2009#' + 
	' : hour(value) >= 6 and hour(value) <= 12; #6/19/2009# : hour(value) >= 6 and hour(value) <= 12; #6/21/2009# : hour(value) >= 6 ' + 
	'and hour(value) <= 12; #6/22/2009# : hour(value) >= 6 and hour(value) <= 12; #6/23/2009# : hour(value) >= 6 and hour(value) <= 1' + 
	'2; #6/24/2009# : hour(value) >= 6 and hour(value) <= 12; #6/25/2009# : hour(value) >= 6 and hour(value) <= 12; #6/26/2009# : hou' + 
	'r(value) >= 6 and hour(value) <= 12; #6/27/2009# : hour(value) >= 6 and hour(value) <= 12; #6/28/2009# : hour(value) >= 6 and ho' + 
	'ur(value) <= 12; #6/29/2009# : hour(value) >= 6 and hour(value) <= 12; #6/30/2009# : hour(value) >= 6 and hour(value) <= 12; #7/' + 
	'1/2009# : hour(value) >= 6 and hour(value) <= 12; #7/2/2009# : hour(value) >= 6 and hour(value) <= 12; #7/3/2009# : hour(value) ' + 
	'>= 6 and hour(value) <= 12; #7/4/2009# : hour(value) >= 6 and hour(value) <= 12; #7/5/2009# : hour(value) >= 6 and hour(value) <' + 
	'= 12; #7/6/2009# : hour(value) >= 6 and hour(value) <= 12; #7/7/2009# : hour(value) >= 6 and hour(value) <= 12; #7/8/2009# : hou' + 
	'r(value) >= 6 and hour(value) <= 12; #7/9/2009# : hour(value) >= 6 and hour(value) <= 12; #7/10/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 12; #7/11/2009# : hour(value) >= 6 and hour(value) <= 12; #7/12/2009# : hour(value) >= 6 and hour(value) <= 12; #7/1' + 
	'3/2009# : hour(value) >= 6 and hour(value) <= 12; #7/14/2009# : hour(value) >= 6 and hour(value) <= 12)';
		ItemNonworkingUnits[AddItem('Test'),OleVariant(False)] := 'date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/6/' + 
	'2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/7/2009# : hour(value) >= 6 and hour(value) <=' + 
	' 10 or hour(value) in (16,17,20,21); #4/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/9/2' + 
	'009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/10/2009# : hour(value) >= 6 and hour(value) <=' + 
	' 10 or hour(value) in (16,17,20,21); #4/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/12' + 
	'/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/13/2009# : hour(value) >= 6 and hour(value) ' + 
	'<= 10 or hour(value) in (16,17,20,21); #4/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/' + 
	'15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/16/2009# : hour(value) >= 6 and hour(value' + 
	') <= 10 or hour(value) in (16,17,20,21); #4/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #' + 
	'4/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/19/2009# : hour(value) >= 6 and hour(val' + 
	'ue) <= 10 or hour(value) in (16,17,20,21); #4/20/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21);' + 
	' #4/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/22/2009# : hour(value) >= 6 and hour(v' + 
	'alue) <= 10 or hour(value) in (16,17,20,21); #4/23/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21' + 
	'); #4/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/25/2009# : hour(value) >= 6 and hour' + 
	'(value) <= 10 or hour(value) in (16,17,20,21); #4/26/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,' + 
	'21); #4/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/28/2009# : hour(value) >= 6 and ho' + 
	'ur(value) <= 10 or hour(value) in (16,17,20,21); #4/29/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2' + 
	'0,21); #4/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/1/2009# : hour(value) >= 6 and h' + 
	'our(value) <= 10 or hour(value) in (16,17,20,21); #5/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2' + 
	'0,21); #5/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/4/2009# : hour(value) >= 6 and ho' + 
	'ur(value) <= 10 or hour(value) in (16,17,20,21); #5/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20' + 
	',21); #5/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/7/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 10 or hour(value) in (16,17,20,21); #5/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,' + 
	'21); #5/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/10/2009# : hour(value) >= 6 and hou' + 
	'r(value) <= 10 or hour(value) in (16,17,20,21); #5/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20' + 
	',21); #5/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/14/2009# : hour(value) >= 6 and h' + 
	'our(value) <= 10 or hour(value) in (16,17,20,21); #5/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,' + 
	'20,21); #5/16/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/17/2009# : hour(value) >= 6 and' + 
	' hour(value) <= 10 or hour(value) in (16,17,20,21); #5/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,1' + 
	'7,20,21); #5/19/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/20/2009# : hour(value) >= 6 a' + 
	'nd hour(value) <= 10 or hour(value) in (16,17,20,21); #5/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16' + 
	',17,20,21); #5/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/23/2009# : hour(value) >= 6' + 
	' and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (' + 
	'16,17,20,21); #5/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/26/2009# : hour(value) >=' + 
	' 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in' + 
	' (16,17,20,21); #5/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/29/2009# : hour(value) ' + 
	'>= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) ' + 
	'in (16,17,20,21); #5/31/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/1/2009# : hour(value)' + 
	' >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) ' + 
	'in (16,17,20,21); #6/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/4/2009# : hour(value) ' + 
	'>= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i' + 
	'n (16,17,20,21); #6/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/7/2009# : hour(value) >' + 
	'= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in' + 
	' (16,17,20,21); #6/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/10/2009# : hour(value) >' + 
	'= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i' + 
	'n (16,17,20,21); #6/12/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/13/2009# : hour(value)' + 
	' >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)' + 
	' in (16,17,20,21); #6/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/16/2009# : hour(valu' + 
	'e) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(valu' + 
	'e) in (16,17,20,21); #6/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/19/2009# : hour(va' + 
	'lue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(va' + 
	'lue) in (16,17,20,21); #6/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/23/2009# : hour(' + 
	'value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(' + 
	'value) in (16,17,20,21); #6/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/26/2009# : hou' + 
	'r(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hou' + 
	'r(value) in (16,17,20,21); #6/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/29/2009# : h' + 
	'our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/30/2009# : hour(value) >= 6 and hour(value) <= 10 or h' + 
	'our(value) in (16,17,20,21); #7/1/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/2/2009# : h' + 
	'our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/3/2009# : hour(value) >= 6 and hour(value) <= 10 or ho' + 
	'ur(value) in (16,17,20,21); #7/4/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/5/2009# : ho' + 
	'ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hou' + 
	'r(value) in (16,17,20,21); #7/7/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/8/2009# : hou' + 
	'r(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour' + 
	'(value) in (16,17,20,21); #7/10/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/11/2009# : ho' + 
	'ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/12/2009# : hour(value) >= 6 and hour(value) <= 10 or ho' + 
	'ur(value) in (16,17,20,21); #7/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/14/2009# : ' + 
	'hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21))';
		AddItem('Default');
	end;
	EndUpdate();
end
972
How can I use the CASE statement (CASE usage)
with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Value')) as EXG2ANTTLib_TLB.Column) do
	begin
		Width := 24;
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with (IUnknown(Columns.Add('CASE - statment')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%0 case (default:''not found'';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen'';14:''Fourth' + 
	'een'')';
		ToolTip := ComputedField;
	end;
	with Items do
	begin
		AddItem(OleVariant(0));
		AddItem(OleVariant(1));
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
971
How can I use the CASE statement (CASE usage)
with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Value')) as EXG2ANTTLib_TLB.Column) do
	begin
		Width := 24;
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with (IUnknown(Columns.Add('CASE - statment')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%0 case (default:''not found'';1:''One'';2:''Two'';3:''Three'';4:''Four'';5:''Five'';7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen''' + 
	';14:''Fourtheen'')';
		ToolTip := ComputedField;
	end;
	with Items do
	begin
		AddItem(OleVariant(0));
		AddItem(OleVariant(1));
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
970
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Value')) as EXG2ANTTLib_TLB.Column) do
	begin
		Width := 24;
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with (IUnknown(Columns.Add('SWITCH - statment')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%0 switch (''not found'', 1,2,3,4,5,7,8,9,11,13,14)';
		ToolTip := ComputedField;
	end;
	with Items do
	begin
		AddItem(OleVariant(0));
		AddItem(OleVariant(1));
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
969
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
with G2antt1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Value')) as EXG2ANTTLib_TLB.Column) do
	begin
		Width := 24;
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with (IUnknown(Columns.Add('IN - statment')) as EXG2ANTTLib_TLB.Column) do
	begin
		ComputedField := '%0 in (1,2,3,4,5,7,8,9,11,13,14) ? ''found'' : ''''';
		ToolTip := ComputedField;
	end;
	with Items do
	begin
		AddItem(OleVariant(0));
		AddItem(OleVariant(1));
		AddItem(OleVariant(2));
	end;
	EndUpdate();
end
968
How can I automatically update the exBarPercent value using a slider control

with G2antt1 do
begin
	BeginUpdate();
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		PaneWidth[False] := 128;
		Bars.Add('Task%Progress').Shortcut := 'Percent';
	end;
	with (IUnknown(Columns.Add('Percent')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(12);
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarKey] := 'P';
	end;
	with Items do
	begin
		i := AddItem(OleVariant(0));
		CellBold[OleVariant(i),OleVariant(0)] := True;
		with CellEditor[OleVariant(i),OleVariant(0)] do
		begin
			EditType := EXG2ANTTLib_TLB.SliderType;
			Option[EXG2ANTTLib_TLB.exSliderStep] := OleVariant(0.01);
			Option[EXG2ANTTLib_TLB.exSpinStep] := OleVariant(0.01);
			Option[EXG2ANTTLib_TLB.exSliderMax] := OleVariant(1);
			Option[EXG2ANTTLib_TLB.exSliderWidth] := OleVariant(-100);
		end;
		CellValueFormat[OleVariant(i),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		AddBar(i,'Percent','1/2/2002','1/6/2002','P',Null);
		ItemBar[i,'P',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
		CellValue[OleVariant(i),OleVariant(0)] := OleVariant(0.5);
	end;
	EndUpdate();
end
967
How can I automatically update the exBarPercent value using a spin control

with G2antt1 do
begin
	BeginUpdate();
	Items.AllowCellValueToItemBar := True;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		PaneWidth[False] := 128;
		Bars.Add('Task%Progress').Shortcut := 'Percent';
	end;
	with (IUnknown(Columns.Add('Percent')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(12);
		FormatColumn := '((0:=round(dbl(%0)*100)) >= 50 ? ''<font 8>''+ =:0 + ''%</font>'' : ''<fgcolor=808080><font 6>''+ =:0 + ''%</font></fgcolor>'')';
	end;
	with Items do
	begin
		i := AddItem(OleVariant(0));
		CellBold[OleVariant(i),OleVariant(0)] := True;
		with CellEditor[OleVariant(i),OleVariant(0)] do
		begin
			EditType := EXG2ANTTLib_TLB.SpinType;
			Option[EXG2ANTTLib_TLB.exSpinStep] := OleVariant(0.01);
			Option[EXG2ANTTLib_TLB.exSliderMax] := OleVariant(1);
		end;
		CellValueFormat[OleVariant(i),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		AddBar(i,'Percent','1/2/2002','1/6/2002',Null,Null);
		CellValue[OleVariant(i),OleVariant(0)] := OleVariant(0.5);
	end;
	EndUpdate();
end
966
How do I specify for an item all units as being non-working units

with G2antt1 do
begin
	BeginUpdate();
	AllowChartScrollPage := True;
	Columns.Add('Non-Work');
	with Chart do
	begin
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		FirstVisibleDate := '4/3/2009 10:00:00 AM';
		PaneWidth[False] := 64;
		LevelCount := 2;
		UnitWidth := 16;
		with Level[0] do
		begin
			Label := '<r><%d%>-<%mmm%>';
			Unit := EXG2ANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<%hh%>';
			Unit := EXG2ANTTLib_TLB.exHour;
			Count := 2;
		end;
	end;
	with Items do
	begin
		AddItem('Default');
		ItemNonworkingUnits[AddItem('All-Non-Working'),OleVariant(False)] := '1';
		AddItem('Default');
	end;
	EndUpdate();
end
965
How do I specify for an item all units as being working units

with G2antt1 do
begin
	BeginUpdate();
	AllowChartScrollPage := True;
	Columns.Add('Non-Work');
	with Chart do
	begin
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		FirstVisibleDate := '4/3/2009 10:00:00 AM';
		PaneWidth[False] := 64;
		LevelCount := 2;
		UnitWidth := 16;
		with Level[0] do
		begin
			Label := '<r><%d%>-<%mmm%>';
			Unit := EXG2ANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<%hh%>';
			Unit := EXG2ANTTLib_TLB.exHour;
			Count := 2;
		end;
	end;
	with Items do
	begin
		AddItem('Default');
		ItemNonworkingUnits[AddItem('All-Working'),OleVariant(False)] := '0';
		AddItem('Default');
	end;
	EndUpdate();
end
964
How can I programmatically specify different non-working units ( days, hours ) for different items

with G2antt1 do
begin
	BeginUpdate();
	AllowChartScrollPage := True;
	Columns.Add('Non-Work');
	with Chart do
	begin
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		Bars.Add('Task:Split').Shortcut := 'Task';
		FirstVisibleDate := '7/13/2009 12:00:00 PM';
		PaneWidth[False] := 52;
		LevelCount := 2;
		UnitWidth := 16;
		with Level[0] do
		begin
			Label := '<r><b><%d%></b> <%mmm%> <%yyyy%>';
			Unit := EXG2ANTTLib_TLB.exDay;
		end;
		with Level[1] do
		begin
			Label := '<%hh%>';
			Unit := EXG2ANTTLib_TLB.exHour;
			Count := 2;
		end;
	end;
	with Items do
	begin
		h := AddItem('Item 1');
		ItemNonworkingUnits[h,OleVariant(False)] := '(shortdate(value) = #7/14/2009# and hour(value) >= 6 and hour(value) <= 12)';
		AddBar(h,'Task','7/14/2009 4:00:00 AM','7/14/2009 2:00:00 PM',Null,Null);
		h := AddItem('Item 2');
		ItemNonworkingUnits[h,OleVariant(False)] := '(((hour(value) >= 4 and hour(value) <= 16) or hour(value) = 2) and month(value) = 7) or ((hour(value) >= 2 and hour(value) < 10)' + 
	') and month(value) = 6 or weekday(value) = 6';
		AddBar(h,'Task','7/14/2009 1:00:00 AM','7/14/2009 6:00:00 AM',Null,Null);
	end;
	EndUpdate();
end
963
I am programmatically select a date using the Chart.SelectDate property, but can't see why the date is not highlighted. What am I doing wrong
with G2antt1 do
begin
	with Chart do
	begin
		LevelCount := 2;
		FirstVisibleDate := '1/1/2001';
		SelectLevel := 1;
		SelectDate['1/4/2001'] := True;
	end;
end
962
How do I show a shorter line in the chart's level

with G2antt1 do
begin
	BeginUpdate();
	GridLineColor := RGB(128,128,128);
	with Chart do
	begin
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
		UnitWidth := 24;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Label := '<%dddd%>';
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelLowerHalf) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine);
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			Count := 6;
			DrawTickLines := EXG2ANTTLib_TLB.LevelLineEnum($200 Or Integer(EXG2ANTTLib_TLB.exLevelMiddleLine) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine));
			DrawTickLinesFrom(0,Integer(EXG2ANTTLib_TLB.exLevelUpperHalf) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine));
		end;
	end;
	EndUpdate();
end
961
How do I replicate the screen shot http://www.exontrol.com/images/exg2antt9.jpg

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headdark.ebn');
		Add(2,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\xpbsel.ebn');
		Add(3,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headligh.ebn');
		Add(4,'CP:1 0 0 1 1');
	end;
	BackColorHeader := $4000000;
	Chart.BackColorLevelHeader := $4000000;
	SelBackColor := $20000ff;
	GridLineColor := RGB(128,128,128);
	HeaderHeight := 22;
	SelForeColor := RGB(0,0,0);
	MarkSearchColumn := False;
	ScrollBySingleLine := False;
	ShowFocusRect := False;
	DefaultItemHeight := 48;
	with Columns do
	begin
		with (IUnknown(Add('Group')) as EXG2ANTTLib_TLB.Column) do
		begin
			Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
			Def[EXG2ANTTLib_TLB.exCellBackColor] := OleVariant(50331648);
			LevelKey := OleVariant(1);
		end;
		with (IUnknown(Add('Histogram')) as EXG2ANTTLib_TLB.Column) do
		begin
			Width := 18;
			AllowSizing := False;
			LevelKey := OleVariant(1);
			Position := 0;
		end;
	end;
	with Chart do
	begin
		FirstVisibleDate := '6/11/2009';
		DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
		PaneWidth[False] := 96;
		LevelCount := 2;
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
		with Level[0] do
		begin
			Label := '<%mmmm%> <%yyyy%>';
			Unit := EXG2ANTTLib_TLB.exMonth;
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
		end;
		with Level[1] do
		begin
			FormatLabel := 'weekday(dvalue)=1?value:''''';
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelLowerHalf) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine);
			DrawTickLinesFrom(0,EXG2ANTTLib_TLB.exLevelSolidLine);
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
		end;
		with Bars.Item['Task'] do
		begin
			Color := $2000000;
			Height := 18;
			OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
			HistogramColor := $1000000;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
		HistogramVisible := True;
		HistogramHeight := 48;
		HistogramView := EXG2ANTTLib_TLB.exHistogramCheckedItems;
	end;
	with Items do
	begin
		h := AddItem('Group <b>A</b>');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(1);
		AddBar(h,'Task','6/12/2009','6/19/2009','K1','Requirements');
		AddBar(h,'Task','6/13/2009','6/21/2009','K2','Sales & Marketing');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		CellState[OleVariant(h),OleVariant(0)] := 1;
		h := AddItem('Group <b>B</b>');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(1);
		AddBar(h,'Task','6/14/2009','6/23/2009','K1','<b>GUI</b> Design');
		AddBar(h,'Task','6/18/2009','6/25/2009','K2','Class Design');
		h := AddItem('Group <b>C</b>');
		CellValueFormat[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.exHTML;
		CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(1);
		AddBar(h,'Task','6/12/2009','6/19/2009','K1','<b>GUI</b> Coding');
		AddBar(h,'Task','6/13/2009','6/25/2009','K2','Design & Concept');
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65280);
		ItemBar[h,'K2',EXG2ANTTLib_TLB.exBarColor] := OleVariant(65280);
	end;
	EndUpdate();
end
960
How can I remove all bars from the chart
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ClearBars(0);
	end;
end
959
How can I change the color for all bars with a specified key
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[0,'K1',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
958
Is there any automatic way to change a property for all bars with a specified key
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		ItemBar[0,'K1',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
	end;
end
957
How can I remove all bars with specified key
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Null);
		AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Null);
		RemoveBar(0,'K1');
	end;
end
956
How do I several bars with different vertical offsets

with G2antt1 do
begin
	Chart.FirstVisibleDate := '1/1/2001';
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Item');
		ItemHeight[h] := 62;
		AddBar(h,'Task','1/2/2001','1/4/2001','T1',Null);
		ItemBar[h,'T1',EXG2ANTTLib_TLB.exBarOffset] := OleVariant(-23);
		AddBar(h,'Task','1/2/2001','1/4/2001','T2',Null);
		ItemBar[h,'T2',EXG2ANTTLib_TLB.exBarOffset] := OleVariant(-11);
		AddBar(h,'Task','1/2/2001','1/4/2001','T3',Null);
		ItemBar[h,'T3',EXG2ANTTLib_TLB.exBarOffset] := OleVariant(1);
		AddBar(h,'Task','1/2/2001','1/4/2001','T4',Null);
		ItemBar[h,'T4',EXG2ANTTLib_TLB.exBarOffset] := OleVariant(13);
		AddBar(h,'Task','1/2/2001','1/4/2001','T5',Null);
		ItemBar[h,'T5',EXG2ANTTLib_TLB.exBarOffset] := OleVariant(25);
	end;
end
955
Is there any option to show gradient bars without using EBN technology

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Item['Task'] do
	begin
		Color := $ff;
		StartColor := $ff00;
		EndColor := $ffff;
		Pattern := EXG2ANTTLib_TLB.exPatternBox;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
	end;
end
954
How can I define a bar with border and solid filling

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Item['Task'] do
	begin
		Color := $ff;
		StartColor := $ffff;
		EndColor := $ffff;
		Pattern := EXG2ANTTLib_TLB.exPatternBox;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
	end;
end
953
How can I define a bar with border and solid filling

with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Item['Task'] do
	begin
		Color := $ff;
		Pattern := EXG2ANTTLib_TLB.exPatternBox;
		Height := 18;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(65535);
	end;
end
952
How do I define a bar with solid border and filling

with G2antt1 do
begin
	VisualAppearance.Add(1,'C:\Program Files\Exontrol\ExG2antt.NET\sample\EBN\blackboxt.ebn');
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Chart.Bars.Item['Task'] do
	begin
		Color := $1000000;
		Height := 18;
	end;
	with Items do
	begin
		h := AddItem('Task');
		AddBar(h,'Task','1/2/2001','1/5/2001','',Null);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
		ItemBar[h,'',EXG2ANTTLib_TLB.exBarBackColor] := OleVariant(65535);
	end;
end
951
Can I control the units/resource/effort being allocated to a bar when displaying OverAllocation histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Effort')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(21);
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 202;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Integer(EXG2ANTTLib_TLB.exRectangularCurve) Or Integer(EXG2ANTTLib_TLB.exPatternDot);
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
			HistogramCriticalValue := 50;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/25/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/28/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','7/1/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
950
Can I control the units/resource/effort being allocated to a bar when displaying Overload histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with (IUnknown(Columns.Add('Effort')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellValueToItemBarProperty] := OleVariant(21);
		Editor.EditType := EXG2ANTTLib_TLB.SpinType;
	end;
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 96;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib_TLB.exHistOverload;
			HistogramCriticalValue := 3;
			ShowHistogramValues := 'value>3?255:1';
			HistogramItems := -11;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
		end;
	end;
	with Items do
	begin
		AllowCellValueToItemBar := True;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(3);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005',Null,Null);
		CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
	end;
	EndUpdate();
end
949
How can I display double-lines curves in the histogram

with G2antt1 do
begin
	AntiAliasing := True;
	with Chart do
	begin
		PaneWidth[False] := 48;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramItems := 3;
			HistogramBorderColor := $80;
			HistogramColor := $ff;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
948
Is there any option to display values in the histogram using different colors

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramItems := 6;
			ShowHistogramValues := 'value>1?255:65280';
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
947
Is there any option to display values in the histogram using different colors

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramItems := 6;
			ShowHistogramValues := 'value>1?255:1';
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
946
How can I display only few values in the histogram, such as the values greater than a value

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			ShowHistogramValues := 'value>1';
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
945
How can I display values in the histogram

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			ShowHistogramValues := '1';
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
end
944
How can I scroll the chart to find a bar
with G2antt1 do
begin
	Columns.Add('Column');
	Chart.LevelCount := 2;
	Chart.PaneWidth[False] := 64;
	DefaultItemHeight := 32;
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',OleVariant(1),Null);
		AddBar(AddItem('Item 2'),'Task','1/2/2001','1/4/2001',OleVariant(2),Null);
		AddBar(AddItem('Item 3'),'Task','1/2/2001','1/4/2001',OleVariant(3),Null);
		AddBar(AddItem('Item 4'),'Task','1/2/2001','1/4/2001',OleVariant(4),Null);
		AddBar(AddItem('Item 5'),'Task','1/2/2001','1/4/2001',OleVariant(5),Null);
		AddBar(AddItem('Item 6'),'Task','1/2/2001','1/4/2001',OleVariant(6),Null);
		AddBar(AddItem('Item 7'),'Task','1/2/2001','1/4/2001',OleVariant(7),Null);
		AddBar(AddItem('Item 8'),'Task','1/2/2001','1/4/2001',OleVariant(8),Null);
		AddBar(AddItem('Item 9'),'Task','1/2/2001','1/4/2001',OleVariant(8),Null);
		AddBar(AddItem('Item 10'),'Task','1/2/2001','1/4/2001',OleVariant(10),Null);
		AddBar(AddItem('Item 11'),'Task','1/2/2001','1/4/2001',OleVariant(11),Null);
		AddBar(AddItem('Item 12'),'Task','1/2/2001','1/4/2001',OleVariant(12),Null);
		AddBar(AddItem('Item 13'),'Task','1/2/2001','1/4/2001',OleVariant(13),Null);
		AddBar(AddItem('Item 14'),'Task','1/2/2001','1/4/2001',OleVariant(14),Null);
	end;
	h := Items.FindBar[OleVariant(14),Null];
	Items.EnsureVisibleItem(h);
	Chart.ScrollTo(G2antt1.Items.ItemBar[h,OleVariant(14),EXG2ANTTLib_TLB.exBarStart],OleVariant(1));
end
943
Can I change the color/marker/frame for selected bars

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(2,'c:\exontrol\images\normal.ebn');
		Add(1,'CP:2 3 2 -3 -2');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $1000000;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2002','1/4/2002','A',Null);
		AddBar(h,'Task','1/6/2002','1/10/2002','B',Null);
		AddBar(h,'Task','1/11/2002','1/14/2002','C',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		ItemBar[h,'B',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
942
Can I display a larger marker for selected bars, eventually using the EBN technology

with G2antt1 do
begin
	BeginUpdate();
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $1000000;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2002','1/4/2002','A',Null);
		AddBar(h,'Task','1/6/2002','1/10/2002','B',Null);
		AddBar(h,'Task','1/11/2002','1/14/2002','C',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		ItemBar[h,'B',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
941
How do I change the color for the selected bars

with G2antt1 do
begin
	BeginUpdate();
	Debug := True;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2002';
		SelBarColor := $ff;
		PaneWidth[False] := 48;
	end;
	Columns.Add('Task');
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2002','1/4/2002','A',Null);
		AddBar(h,'Task','1/6/2002','1/10/2002','B',Null);
		AddBar(h,'Task','1/11/2002','1/14/2002','C',Null);
		ItemBar[h,'A',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		ItemBar[h,'B',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
	end;
	EndUpdate();
end
940
How can I change the background color for child bars of a summary bar

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	HasLines := EXG2ANTTLib_TLB.exNoLine;
	with Chart do
	begin
		AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
		AllowLinkBars := False;
		FirstVisibleDate := '1/1/2008';
		LevelCount := 2;
		PaneWidth[False] := 112;
	end;
	Columns.Add('');
	with Items do
	begin
		hR1 := AddItem('Team 1');
		AddBar(hR1,'Summary','1/2/2008','1/8/2008','',Null);
		ItemBar[hR1,'',EXG2ANTTLib_TLB.exSummaryBarBackColor] := OleVariant(12895428);
		h1 := InsertItem(hR1,Null,'Member 1');
		AddBar(h1,'Task','1/2/2008','1/7/2008',Null,Null);
		DefineSummaryBars(hR1,'',h1,'');
		h1 := InsertItem(hR1,Null,'Member 2');
		AddBar(h1,'Task','1/4/2008','1/9/2008',Null,Null);
		DefineSummaryBars(hR1,'',h1,'');
		h1 := InsertItem(hR1,Null,'Member 3');
		AddBar(h1,'Task','1/5/2008','1/10/2008',Null,Null);
		DefineSummaryBars(hR1,'',h1,'');
		ExpandItem[hR1] := True;
	end;
	EndUpdate();
end
939
How can I allow resizing the bar only in the right part of the bar
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(2);
	end;
end
938
How can I allow resizing the bar only in the left part of the bar
with G2antt1 do
begin
	Columns.Add('Task');
	Chart.FirstVisibleDate := '1/1/2001';
	with Items do
	begin
		h := AddItem('Task 1');
		AddBar(h,'Task','1/2/2001','1/6/2001','K1',Null);
		ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(1);
	end;
end
937
How can I show the links that starts from selected bar being more visible, while the rest being transparent

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
		ShowLinksWidth[EXG2ANTTLib_TLB.exShowLinksStartFrom] := 2;
		ShowLinksStyle[EXG2ANTTLib_TLB.exShowLinksStartFrom] := EXG2ANTTLib_TLB.exLinkDot;
		ShowLinksColor[EXG2ANTTLib_TLB.exShowLinksEndTo] := $c8c8c8;
		ShowLinksColor[EXG2ANTTLib_TLB.exShowUnselectedLinks] := $c8c8c8;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','9/21/2006','9/23/2006',Null,Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','9/25/2006','9/27/2006',Null,Null);
		ItemBar[h2,'',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		AddLink('L1',h1,'',h2,'');
		Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'L1';
		h3 := AddItem('Task 3');
		AddBar(h3,'Task','9/29/2006','10/2/2006',Null,Null);
		AddLink('L2',h2,'',h3,'');
		Link['L2',EXG2ANTTLib_TLB.exLinkText] := 'L2';
	end;
	EndUpdate();
end
936
How can I show only the links that starts from selected bar

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	Columns.Add('Tasks');
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
	(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
		ShowLinksColor[EXG2ANTTLib_TLB.exShowLinksEndTo] := BackColor;
		ShowLinksColor[EXG2ANTTLib_TLB.exShowUnselectedLinks] := BackColor;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		CellValue[OleVariant(h1),OleVariant(1)] := '9/21/2006';
		CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],Null,Null);
		h2 := InsertItem(h,Null,'Task 2');
		CellValue[OleVariant(h2),OleVariant(1)] := '9/25/2006';
		CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
		AddBar(h2,'Task',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],Null,Null);
		ItemBar[h2,'',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Null,'Task 3');
		CellValue[OleVariant(h3),OleVariant(1)] := '9/29/2006';
		CellValue[OleVariant(h3),OleVariant(2)] := '10/2/2006';
		AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],Null,Null);
		AddLink('L2',h2,'',h3,'');
	end;
	EndUpdate();
end
935
How can I hide links that are not related to selected bar

with G2antt1 do
begin
	BeginUpdate();
	MarkSearchColumn := False;
	OnResizeControl := EXG2ANTTLib_TLB.exResizeChart;
	Columns.Add('Tasks');
	(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
	(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		PaneWidth[False] := 64;
		ShowLinksColor[EXG2ANTTLib_TLB.exShowUnselectedLinks] := BackColor;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		CellValue[OleVariant(h1),OleVariant(1)] := '9/21/2006';
		CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
		AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],Null,Null);
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarSelected] := OleVariant(True);
		h2 := InsertItem(h,Null,'Task 2');
		CellValue[OleVariant(h2),OleVariant(1)] := '9/25/2006';
		CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
		AddBar(h2,'Task',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],Null,Null);
		AddLink('L1',h1,'',h2,'');
		h3 := InsertItem(h,Null,'Task 3');
		CellValue[OleVariant(h3),OleVariant(1)] := '9/29/2006';
		CellValue[OleVariant(h3),OleVariant(2)] := '10/2/2006';
		AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],Null,Null);
		AddLink('L2',h2,'',h3,'');
	end;
	EndUpdate();
end
934
How can I show the direction of the link using EBN files

with G2antt1 do
begin
	BeginUpdate();
	with VisualAppearance do
	begin
		Add(1,'c:\exontrol\images\normal.ebn');
		Add(2,'CP:1 -1 -1 1 1');
		Add(3,'CP:1 -2 -2 2 2');
	end;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 128;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','1/2/2001','1/4/2001','B1',Null);
		h2 := AddItem('Task 2');
		AddBar(h2,'Task','1/5/2001','1/13/2001','B2',Null);
		AddLink('L1',h1,'B1',h2,'B2');
		Link['L1',EXG2ANTTLib_TLB.exLinkArrowColor] := OleVariant(16777216);
		h2 := AddItem('Task 3');
		AddBar(h2,'Task','1/5/2001','1/13/2001','B3',Null);
		AddLink('L2',h1,'B1',h2,'B3');
		Link['L2',EXG2ANTTLib_TLB.exLinkArrowColor] := OleVariant(33554432);
		h2 := AddItem('Task 4');
		AddBar(h2,'Task','1/5/2001','1/13/2001','B5',Null);
		AddLink('L3',h1,'B1',h2,'B5');
		Link['L3',EXG2ANTTLib_TLB.exLinkArrowColor] := OleVariant(50331648);
	end;
	EndUpdate();
end
933
How can I show round links

with G2antt1 do
begin
	Chart.FirstVisibleDate := '1/1/2001';
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Null);
		AddBar(AddItem('Item 2'),'Task','1/5/2001','1/13/2001','B2',Null);
		AddLink('L1',FindItem['Item 1',OleVariant(0),Null],'B1',FindItem['Item 2',OleVariant(0),Null],'B2');
		Link['L1',EXG2ANTTLib_TLB.exLinkShowRound] := OleVariant(True);
	end;
end
932
How can I change the color to display the arrow of the link

with G2antt1 do
begin
	Chart.FirstVisibleDate := '1/1/2001';
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Null);
		AddBar(AddItem('Item 2'),'Task','1/6/2001','1/14/2001','B2',Null);
		AddLink('L1',FindItem['Item 1',OleVariant(0),Null],'B1',FindItem['Item 2',OleVariant(0),Null],'B2');
		Link['L1',EXG2ANTTLib_TLB.exLinkArrowColor] := OleVariant(255);
	end;
end
931
I use UnitScale: exHour and I want to show only from 9 to 18 hour. The idea is to show only the working part of a day. Is this possible

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		MarkTodayColor := BackColor;
		BackColorLevelHeader := $ffffff;
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Label := '<b><%dddd%></b> <%d%>';
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			DrawTickLines := EXG2ANTTLib_TLB.exLevelNoLine;
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelMiddleLine) Or Integer(EXG2ANTTLib_TLB.exLevelDotLine);
			DrawTickLinesFrom(0,EXG2ANTTLib_TLB.exLevelDotLine);
		end;
		NonworkingHours := 16253439;
		ShowNonworkingUnits := False;
		ShowNonworkingDates := False;
		ShowNonworkingHours := False;
	end;
	EndUpdate();
end
930
Can I display tick lines from other level to my base level so time units gets separated more clearly

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
		UnitWidth := 24;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Label := '<%dddd%>';
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelLowerHalf) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine);
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			Count := 6;
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelMiddleLine) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine);
			DrawTickLinesFrom(0,EXG2ANTTLib_TLB.exLevelSolidLine);
		end;
	end;
	EndUpdate();
end
929
Is there any property to change the style of the tick lines being shown in the chart

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		UnitWidth := 24;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			Label := '<%dddd%>';
			DrawTickLines := EXG2ANTTLib_TLB.exLevelSolidLine;
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			Count := 6;
			DrawTickLines := Integer(EXG2ANTTLib_TLB.exLevelUpperHalf) Or Integer(EXG2ANTTLib_TLB.exLevelSolidLine);
		end;
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelSolidLine;
	end;
	EndUpdate();
end
928
Is there any property to change the style of the tick lines being shown in the chart

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelSolidLine;
		with Level[0] do
		begin
			Label := '<%dddd%>';
			DrawTickLines := EXG2ANTTLib_TLB.exLevelSolidLine;
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			Count := 6;
			DrawTickLines := EXG2ANTTLib_TLB.exLevelSolidLine;
		end;
	end;
	EndUpdate();
end
927
How can I show the levels based on the base level so tick lines aligns better

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		AdjustLevelsToBase := True;
		UnitWidth := 24;
		FirstVisibleDate := '1/1/2001';
		PaneWidth[False] := 0;
		LevelCount := 2;
		Level[0].Label := '<%dddd%>';
		with Level[1] do
		begin
			Label := OleVariant(65536);
			Count := 5;
		end;
	end;
	EndUpdate();
end
926
How can I show only working hours in other words only the working part of the day

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		AllowSelectDate := EXG2ANTTLib_TLB.exNoSelectDate;
		MarkTodayColor := BackColor;
		PaneWidth[False] := 0;
		LevelCount := 2;
		with Level[0] do
		begin
			Label := '<b><%dddd%></b> <%d%>';
			Alignment := EXG2ANTTLib_TLB.CenterAlignment;
			DrawTickLines := EXG2ANTTLib_TLB.exLevelNoLine;
		end;
		with Level[1] do
		begin
			Label := OleVariant(65536);
			ReplaceLabel['09'] := '<fgcolor=FF0000><b><font ;10>9</font></b></fgcolor>';
		end;
		NonworkingHours := 16253439;
		ShowNonworkingUnits := False;
		ShowNonworkingDates := False;
		ShowNonworkingHours := False;
	end;
	EndUpdate();
end
925
How can I specify the effort for bars when displaying the overload histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 52;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := Pattern;
			HistogramType := EXG2ANTTLib_TLB.exHistOverload;
			HistogramItems := -6;
			HistogramGridLinesColor := $c0c0c0;
			HistogramRulerLinesColor := $10000;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/23/2005','','4');
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/26/2005','',OleVariant(3));
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(3);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/27/2005','6/29/2005','',OleVariant(2));
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(2);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/30/2005','7/2/2005','',OleVariant(1));
	end;
	EndUpdate();
end
924
How can I display the cumulative histogram and showing the bars that generated it using different colors

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 128;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternSolid;
			HistogramType := EXG2ANTTLib_TLB.exHistCumulative;
			HistogramCumulativeOriginalColorBars := EXG2ANTTLib_TLB.exChangeColor;
			HistogramItems := 6;
			HistogramRulerLinesColor := $80;
			HistogramBorderColor := $1;
		end;
	end;
	with (IUnknown(Columns.Add('Column')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 3'),'Task','1/4/2001','1/6/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 4'),'Task','1/2/2001','1/8/2001',Null,Null);
		CellState[OleVariant(ItemByIndex[1]),OleVariant(0)] := 1;
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
923
How can I show the cumulative histogram for my bar

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 128;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternSolid;
			HistogramType := EXG2ANTTLib_TLB.exHistCumulative;
			HistogramItems := 6;
			HistogramRulerLinesColor := $80;
			HistogramBorderColor := $1;
		end;
	end;
	with (IUnknown(Columns.Add('Column')) as EXG2ANTTLib_TLB.Column) do
	begin
		Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 3'),'Task','1/4/2001','1/6/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 4'),'Task','1/2/2001','1/8/2001',Null,Null);
		CellState[OleVariant(ItemByIndex[1]),OleVariant(0)] := 1;
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
922
How can I show some grid lines or ruler in the histogram

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 78;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramItems := 6;
			HistogramRulerLinesColor := $80;
			HistogramGridLinesColor := $ff;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project 1');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
921
Is there any property to show some grid lines in the histogram

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 78;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramItems := 6;
			HistogramGridLinesColor := $ff;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project 1');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
920
How can I specify a fixed number of bars/items being shown in the histogram

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 78;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramCriticalValue := 3;
			HistogramItems := -6;
			HistogramRulerLinesColor := $1;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project 1');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
		h := AddItem('Project 2');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/4/2001','1/7/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/6/2001','1/8/2001',Null,Null);
		ExpandItem[h] := True;
		h := AddItem('Project 3');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
		h := AddItem('Project 4');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/4/2001','1/7/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/6/2001','1/8/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
919
Is there any option to specify a minimum number of bars/items displayed in the histogram

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 64;
		PaneWidth[False] := 78;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
			HistogramItems := 6;
			HistogramGridLinesColor := $1;
			HistogramRulerLinesColor := $1;
		end;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project 1');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
		h := AddItem('Project 2');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/4/2001','1/7/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/6/2001','1/8/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
918
How can I show the histogram without grouping the bars based on their parents

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramNoGrouping) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project 1');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
		h := AddItem('Project 2');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/4/2001','1/7/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/6/2001','1/8/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
917
How can I show the histogram for checked item and all recursively child items

with G2antt1 do
begin
	BeginUpdate();
	with Chart do
	begin
		PaneWidth[False] := 128;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 128;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramRecLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		CellState[OleVariant(h),OleVariant(0)] := 1;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/5/2001',Null,Null);
		ExpandItem[h] := True;
		h := InsertItem(h,Null,'SubProject');
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/3/2001','1/7/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/5/2001','1/8/2001',Null,Null);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
916
How can I show the histogram for checked item and its child items

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramLeafItems) Or Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Project');
		CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
		AddBar(InsertItem(h,Null,'Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(InsertItem(h,Null,'Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
		ExpandItem[h] := True;
	end;
end
915
How can I show the histogram for all items

with G2antt1 do
begin
	BeginUpdate();
	SingleSel := False;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		LevelCount := 2;
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
	end;
	EndUpdate();
end
914
How can I prevent selecting a new item when clicking the chart area so my selection is shown in the histogram

with G2antt1 do
begin
	SingleSel := False;
	with Chart do
	begin
		SelectOnClick := False;
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := EXG2ANTTLib_TLB.exHistogramSelectedItems;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
		SelectItem[ItemByIndex[0]] := True;
	end;
end
913
How can I show bars in the histogram for selected items only

with G2antt1 do
begin
	SingleSel := False;
	with Chart do
	begin
		FirstVisibleDate := '1/1/2001';
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := EXG2ANTTLib_TLB.exHistogramSelectedItems;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
	end;
	Columns.Add('Column');
	with Items do
	begin
		AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Null,Null);
		AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Null,Null);
		SelectItem[ItemByIndex[0]] := True;
	end;
end
912
How can I change the color and size for the curve in the histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 68;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.PatternEnum($100 Or Integer(EXG2ANTTLib_TLB.exPatternDot));
			HistogramBorderColor := $ff00;
			HistogramBorderSize := 5;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task');
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),OleVariant(1));
		AddBar(h1,'Task','6/23/2005','6/28/2005',OleVariant(2),OleVariant(2));
	end;
	EndUpdate();
end
911
How can I change the color for the frame in the histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 68;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.PatternEnum($100 Or Integer(EXG2ANTTLib_TLB.exPatternShadow));
			HistogramItems := 5;
			HistogramBorderColor := $ff;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task');
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),OleVariant(1));
		AddBar(h1,'Task','6/23/2005','6/28/2005',OleVariant(2),OleVariant(2));
	end;
	EndUpdate();
end
910
How can I force the histogram for a bar being shown all the time

with G2antt1 do
begin
	BeginUpdate();
	ScrollBySingleLine := True;
	(IUnknown(Columns.Add('Tasks')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 64;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 68;
		HistogramView := Integer(EXG2ANTTLib_TLB.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib_TLB.exHistogramCheckedItems);
		with Bars.Copy('Task','H') do
		begin
			Color := $ff00;
			HistogramPattern := EXG2ANTTLib_TLB.PatternEnum($100);
			HistogramItems := 5;
			HistogramColor := Color;
			HistogramGridLinesColor := $808080;
			HistogramRulerLinesColor := $10000;
		end;
		with Bars.Item['Task'] do
		begin
			HistogramCriticalColor := $800000;
			HistogramPattern := Pattern;
			HistogramItems := 5;
			HistogramGridLinesColor := $808080;
			HistogramRulerLinesColor := $10000;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Hidden');
		AddBar(h1,'H','6/23/2005','6/28/2005',OleVariant(1),Null);
		AddBar(h1,'H','6/24/2005','6/26/2005',OleVariant(2),Null);
		CellState[OleVariant(h1),OleVariant(0)] := 1;
		ItemHeight[h1] := 0;
		SelectableItem[h1] := False;
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),Null);
		CellState[OleVariant(h1),OleVariant(0)] := 1;
		h1 := AddItem('Task 2');
		CellState[OleVariant(h1),OleVariant(0)] := 1;
		AddBar(h1,'Task','6/24/2005','7/1/2005',OleVariant(1),Null);
	end;
	EndUpdate();
end
909
How can I remove a bar type from the histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 32;
		with Bars.Item['Task'] do
		begin
			HistogramCriticalColor := $800000;
			HistogramPattern := Pattern;
		end;
		with Bars.Copy('Task','Green') do
		begin
			Color := $ff00;
			HistogramPattern := Pattern;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Green','6/22/2005','6/26/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarOffset] := OleVariant(3);
		h1 := AddItem('Task 2');
		AddBar(h1,'Green','6/28/2005','6/30/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/27/2005','7/1/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarOffset] := OleVariant(3);
	end;
	with Chart.Bars.Item['Green'] do
	begin
		HistogramColor := Color;
		HistogramPattern := EXG2ANTTLib_TLB.exPatternEmpty;
	end;
	EndUpdate();
end
908
How can I show the two buttons in the vertical splitter but still resizes the chart when the control gets resized

with G2antt1 do
begin
	OnResizeControl := Integer(EXG2ANTTLib_TLB.exSplitterShowButtons) Or Integer(EXG2ANTTLib_TLB.exResizeChart);
	Chart.PaneWidth[False] := 96;
	Chart.LevelCount := 2;
end
907
I have seen a screen shot on your web page that shows two buttons on the vertical scroll bar. How can I show them
with G2antt1 do
begin
	OnResizeControl := EXG2ANTTLib_TLB.exSplitterShowButtons;
	Chart.PaneWidth[False] := 96;
end
906
How can I disable selecting a new item once the user clicks the chart area

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	SingleSel := False;
	with Chart do
	begin
		SelectOnClick := False;
		AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
		LevelCount := 2;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 32;
		HistogramView := EXG2ANTTLib_TLB.exHistogramSelectedItems;
		Bars.Item['Task'].HistogramPattern := EXG2ANTTLib_TLB.exPatternSolid;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/22/2005','6/26/2005',OleVariant(0),Null);
		SelectItem[h1] := True;
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/24/2005','6/30/2005',OleVariant(0),Null);
		SelectItem[h1] := True;
	end;
	EndUpdate();
end
905
Is there any option to display the chart's header in the bottom side of the histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		HistogramHeight := 96;
		HistogramHeaderVisible := True;
		with Bars.Item['Task'] do
		begin
			Color := $ff0000;
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsOffset;
			OverlaidGroup := 'Task2';
			HistogramCriticalColor := $800000;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
		with Bars.Copy('Task','Task2') do
		begin
			Color := $ff00;
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsOffset;
			OverlaidGroup := 'Task';
			HistogramCriticalColor := $8000;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task2','6/22/2005','6/26/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(0),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(3);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task2','6/28/2005','6/30/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/27/2005','7/1/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(0),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(1);
	end;
	EndUpdate();
end
904
How can I display the child bars as soon as an item gets collapsed

with G2antt1 do
begin
	BeginUpdate();
	LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
	Columns.Add('Tasks');
	with Chart do
	begin
		FirstVisibleDate := '9/20/2006';
		ShowCollapsedBars := True;
		LevelCount := 2;
		PaneWidth[False] := 96;
	end;
	with Items do
	begin
		h := AddItem('Project 1');
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/23/2006','A',Null);
		h2 := InsertItem(h,Null,'Task 2');
		AddBar(h2,'Task','9/24/2006','9/26/2006','B',Null);
		h3 := InsertItem(h,Null,'Task 3');
		AddBar(h3,'Task','9/27/2006','9/29/2006','C',Null);
		h := AddItem('Project 2');
		h1 := InsertItem(h,Null,'Task 1');
		AddBar(h1,'Task','9/21/2006','9/23/2006','A',Null);
		h2 := InsertItem(h,Null,'Task 2');
		AddBar(h2,'Task','9/24/2006','9/26/2006','B',Null);
		h3 := InsertItem(h,Null,'Task 3');
		AddBar(h3,'Task','9/27/2006','9/29/2006','C',Null);
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
903
What exBarEffort property represents

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/9/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		HistogramHeight := 164;
		with Bars.Item['Task'] do
		begin
			HistogramPattern := EXG2ANTTLib_TLB.PatternEnum($100);
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/10/2005','6/11/2005',Null,'1/1=<b>100%');
		ItemBar[h1,Null,EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/12/2005','6/14/2005',Null,'1/2=<b>50%');
		ItemBar[h1,Null,EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		h1 := AddItem('Task 3');
		AddBar(h1,'Task','6/15/2005','6/18/2005',Null,'1/3=<b>33%');
		ItemBar[h1,Null,EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		h1 := AddItem('Task 4');
		AddBar(h1,'Task','6/19/2005','6/23/2005',Null,'1/4=<b>25%');
		ItemBar[h1,Null,EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
		h1 := AddItem('Task 5');
		AddBar(h1,'Task','6/24/2005','6/29/2005',Null,'1/5=<b>20%');
		ItemBar[h1,Null,EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
	end;
	EndUpdate();
end
902
Can I display multiple curves in the histogram

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		HistogramHeight := 64;
		with Bars.Item['Task'] do
		begin
			Color := $ff0000;
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsOffset;
			OverlaidGroup := 'Task2';
			HistogramCriticalColor := $800000;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
		with Bars.Copy('Task','Task2') do
		begin
			Color := $ff00;
			OverlaidType := EXG2ANTTLib_TLB.exOverlaidBarsOffset;
			OverlaidGroup := 'Task';
			HistogramCriticalColor := $8000;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task2','6/22/2005','6/26/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/21/2005','6/25/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(0),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(3);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task2','6/28/2005','6/30/2005',OleVariant(0),Null);
		AddBar(h1,'Task','6/27/2005','7/1/2005',OleVariant(1),Null);
		ItemBar[h1,OleVariant(0),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		ItemBar[h1,OleVariant(1),EXG2ANTTLib_TLB.exBarEffort] := OleVariant(1);
	end;
	EndUpdate();
end
901
How can I use the exBarEffort property

with G2antt1 do
begin
	BeginUpdate();
	Columns.Add('Tasks');
	with Chart do
	begin
		LevelCount := 2;
		NonworkingDays := 0;
		PaneWidth[False] := 40;
		FirstVisibleDate := '6/20/2005';
		HistogramVisible := True;
		HistogramHeight := 64;
		HistogramView := EXG2ANTTLib_TLB.exHistogramAllItems;
		with Bars.Item['Task'] do
		begin
			HistogramCriticalColor := $ff;
			HistogramPattern := EXG2ANTTLib_TLB.exBezierCurve;
			HistogramType := EXG2ANTTLib_TLB.exHistOverAllocation;
		end;
	end;
	with Items do
	begin
		h1 := AddItem('Task 1');
		AddBar(h1,'Task','6/21/2005','6/25/2005',Null,Null);
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(4);
		h1 := AddItem('Task 2');
		AddBar(h1,'Task','6/27/2005','7/1/2005',Null,Null);
		ItemBar[h1,'',EXG2ANTTLib_TLB.exBarEffort] := OleVariant(1);
	end;
	EndUpdate();
end